package com.example.unisys.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.unisys.entity.StuCourse;
import com.example.unisys.dao.StuCourseMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class StuCourseService extends ServiceImpl<StuCourseMapper,StuCourse> {



    public List<Map<String,Object>> GetExcel(Map map){
        return baseMapper.GetExcel(map);
    }


   public int insert(StuCourse stucourser){
        return baseMapper.insert(stucourser);
    }

   public int insertSelective(StuCourse stucourser){
        return baseMapper.insertSelective(stucourser);
    }

   public int update(StuCourse stucourse){
        return baseMapper.update(stucourse);
    }

   public List<StuCourse> getById(String exam_id){
        return baseMapper.getByIds(exam_id);
    }
/*
    public int delete(@Param("exam_id") long exam_id){
       return baseMapper.delete(exam_id);
    }
    */

   public int delete(long exam_id,String course_id){
       return baseMapper.delete(exam_id,course_id);
   }

   public String getStudyCatch(String exam_id,String course_id){
       return baseMapper.getStudyCatch(exam_id,course_id);
   }

   public String getPhaseCatch(String exam_id,String course_id){
       return baseMapper.getPhaseCatch(exam_id,course_id);
   }


    public List<StuCourse> getByIdHis(String exam_id,String tag) {
       return baseMapper.getByIdHis(exam_id,tag);
    }
}
